<template>
  <div class="demo">
    名字：{{name}}，地址：{{address}}
    <button @click="getSchollName(name)">传递学校名</button>
  </div>
</template>

<script>
export default {
  name:'School',
  data(){
    return {
      name:"xxx学校",
      address:"china",
    }
  },
  props:['getSchollName'],
}
</script>

<style scoped>
  .demo {
    background-color: #ccc;
  }
</style>